package com.usian.feign;

import com.usian.pojo.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author lpf
 * @Date 2022/3/26 上午11:37
 * @ProjectName java134-e-commerce-project
 * @Version 1.0
 * @Description:
 */
@FeignClient(name = "usian-sso-service")
public interface OSSServiceFeign {

    @RequestMapping(value = "service/sso/checkUserInfo/{checkValue}/{checkFlag}")
    Boolean checkUserInfo(@PathVariable("checkValue") String checkValue, @PathVariable("checkFlag") Integer checkFlag);

    @RequestMapping(value = "service/sso/userRegister")
    Integer userRegister(@RequestBody TbUser tbUser);

    @RequestMapping(value = "service/sso/userLogin")
    Map userLogin(@RequestParam("username") String username, @RequestParam("password") String password);

    @RequestMapping(value = "service/sso/getUserByToken/{token}")
    TbUser getUserByToken(@PathVariable("token") String token);

    @RequestMapping(value = "service/sso/logout")
    Boolean logOut(@RequestParam String token);
}
